#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
char * my_strncpy(char *dest,const char *src,size_t num)
{
	while (*dest++ && *src++&&num--)
	{
		;
	}
	return dest;
}

int main()
{
	char arr[] = "adasda";
	char brr[] = "jjnfs";
	my_strncpy(arr, brr, 5);
	printf("%s", arr);
	return 0;
}